(global.webpackJsonp = global.webpackJsonp || []).push([
  ["wjyk_recycle/pages/city-partner/city-partner"], {
    2987: function (t, a, i) {
      (function (o) {
        Object.defineProperty(a, "__esModule", {
          value: !0
        }), a.default = void 0;
        var t, r = (t = i("4795")) && t.__esModule ? t : {
          default: t
        };

        function c(t, e, n, o, r, a, i) {
          try {
            var s = t[a](i),
              c = s.value;
          } catch (t) {
            return n(t), 0;
          }
          s.done ? e(c) : Promise.resolve(c).then(o, r);
        }

        function e(s) {
          return function () {
            var t = this,
              i = arguments;
            return new Promise(function (e, n) {
              var o = s.apply(t, i);

              function r(t) {
                c(o, e, n, r, a, "next", t);
              }

              function a(t) {
                c(o, e, n, r, a, "throw", t);
              }
              r(void 0);
            });
          };
        }
        var n = {
          data: function () {
            return {
              // 普通选择器列表设置,及初始化
              countryList: ['区域代理服务商', '区域运营服务商'],
              countryIndex: '',
              // 省市区三级联动初始化
              region: ["四川省", "广元市", "苍溪县"],
              // 多列选择器(二级联动)列表设置,及初始化
              multiArray: [
                [1, 2, 3, 4, 5, 6, 7, 8, 9],
                [1, 2, 3, 4, 5, 6, 7, 8, 9]
              ],
              multiIndex: [3, 5],
              // 多列选择器(三级联动)列表设置,及初始化
              multiArray3: [
                [1, 2, 3, 4, 5, 6, 7, 8, 9],
                [1, 2, 3, 4, 5, 6, 7, 8, 9],
                [1, 2, 3, 4, 5, 6, 7, 8, 9]
              ],
              multiIndex3: [3, 5, 4],
              pic_url: this.$imgUrl,
              system: {},
              partnerSystem: {},
              name: "",
              telphone: "",
              input_code: "",
              code: "",
              title: "获取验证码",
              timer: 60,
              disabled: !1,
              protocolRichText: "",
              flag: 0,
              regularFlag: 0,
              agreeFlag: 0,
              is_open: null,
              region: ["", "", ""],
              province: "",
              city: "",
              county: "",
              placeholder:'请选择合作模式'
            };
          },
          onLoad: function () {
            this.systems(), this.partnerSet(), this.changeFlag(1, "single");
          },
          methods: {
           
            // 选择国家函数
            changeCountry: function (e) {
              var that = this
              // debugger
              console.log('0000000000')
              console.log(e)
              that.countryIndex = e.detail.value
              // that.setData({
              //   countryIndex: e.detail.value
              // });
            },
            // // 选择省市区函数
            // changeRegin(e) {
            //   this.setData({
            //     region: e.detail.value
            //   });
            // },
            // // 选择二级联动
            // changeMultiPicker(e) {
            //   this.setData({
            //     multiIndex: e.detail.value
            //   })
            // },
            // // 选择三级联动
            // changeMultiPicker3(e) {
            //   this.setData({
            //     multiIndex3: e.detail.value
            //   })
            // },
            bindPickerChange: function (t) {
              console.log("picker发送选择改变，携带值为", t, t.target.value), this.region[0] = t.target.value[0],
                this.region[1] = t.target.value[1], this.region[2] = t.target.value[2], this.province = t.target.value[0],
                this.city = t.target.value[1], this.county = t.target.value[2];
            },
            close: function () {
              this.$refs.pop.close();
            },
            openProtocol: function () {
              this.$refs.pop.show({
                title: this.partnerSystem.protocol_name,
                content: "<div>&nbsp;</div>",
                style: "background-color:#fff;width:600rpx;border-radius:10rpx;",
                xclose: !0
              });
            },
            changeFlag: function (t, e) {
              console.log("选择性别", t, e), "single" == e ? (this.flag = t, this.regularFlag = 0) : (this.regularFlag = t,
                this.flag = 0);
            },
            isAgree: function (t) {
              this.agreeFlag = t;
            },
            systems: function () {
              var n = this;
              return e(r.default.mark(function t() {
                var e;
                return r.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.system
                      });

                    case 2:
                      0 == (e = t.sent).errno && (console.log("系统设置", e), n.is_open = e.data.is_open,
                        n.system = e.data);

                    case 4:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            },
            partnerSet: function () {
              var n = this;
              return e(r.default.mark(function t() {
                var e;
                return r.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.partnerSet
                      });

                    case 2:
                      0 == (e = t.sent).errno && (console.log("合伙人设置", e), n.protocolRichText = e.data.protocol,
                        n.partnerSystem = e.data);

                    case 4:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            },
            becomeRecycler: function () {
              return console.log("----------", this.flag, this.regularFlag, this.agreeFlag), this.name ? 0 == this.flag && 0 == this.regularFlag ? (this.showToast("请选择性别"),
                !1) : this.telphone ? /^1[3456789]\d{9}$/.test(this.telphone) ? this.input_code || 1 != this.is_open ? this.input_code != this.code && 1 == this.is_open ? (this.showToast("验证码错误"),
                !1) : this.province ? 0 == this.agreeFlag ? (this.showToast("请勾选" + this.partnerSystem.protocol_name),
                !1) : (console.log("提交成功"), void this.partnerRegister()) : (this.showToast("请选择申请城市"),
                !1) : (this.showToast("请输入验证码"), !1) : (this.showToast("请输入正确的手机号码"), !1) : (this.showToast("手机号码不能为空"),
                !1) : (this.showToast("姓名不能为空"), !1);
            },
            partnerRegister: function () {
              var n = this;
              return e(r.default.mark(function t() {
                var e;
                return r.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      e = 0 == n.flag ? 2 : 1, console.log("性别", e), n.$http({
                        url: n.$api.partnerRegister,
                        data: {
                          uid: o.getStorageSync("uid"),
                          name: n.name,
                          sex: e,
                          telphone: n.telphone,
                          money: n.partnerSystem.money,
                          province: n.province,
                          city: n.city,
                          county: n.county
                        }
                      }).then(function (t) {
                        o.navigateTo({
                          url: "../apply-settle/apply-settle?name=partner"
                        });
                      }).catch(function (t) {
                        console.log("**************", t), n.$sun.toast(t.data.message);
                      });

                    case 3:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            },
            showToast: function (t) {
              o.showToast({
                title: t,
                duration: 1e3,
                icon: "none"
              });
            },
            getCode: function () {
              var t = this;
              console.log("++++++++", this.telphone);
              var e = !0;
              if (this.disabled) console.log("重复点击");
              else {
                if (!/^1[3456789]\d{9}$/.test(this.telphone)) return void wx.showToast({
                  title: "请输入正确的手机号码",
                  icon: "none"
                });
                this.disabled = !0;
                var n = setInterval(function () {
                  if (t.timer--, t.title = t.timer + "s后重新发送", 0 == t.timer) return clearInterval(n),
                    t.title = "获取验证码", t.disabled = !1, void(t.timer = 60);
                }, 1e3);
              }
              e && this.sendMobile();
            },
            sendMobile: function () {
              var n = this;
              return e(r.default.mark(function t() {
                var e;
                return r.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.sendMobile,
                        data: {
                          telphone: n.telphone
                        }
                      });

                    case 2:
                      e = t.sent, console.log("发送验证码成功", e), 0 == e.errno && (console.log("验证码", e, e.data),
                        n.code = e.data);

                    case 5:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            }
          }
        };
        a.default = n;
      }).call(this, i("543d").default);
    },
    "2e42": function (t, e, n) {
      n.r(e);
      var o, r = n("2987"),
        a = n.n(r);
      for (o in r) "default" !== o && function (t) {
        n.d(e, t, function () {
          return r[t];
        });
      }(o);
      e.default = a.a;
    },
    "9f19": function (t, e, n) {},
    b5a1: function (t, e, n) {
      var o = n("9f19");
      n.n(o).a;
    },
    be5b: function (t, e, n) {
      (function (t) {
        function e(t) {
          return t && t.__esModule ? t : {
            default: t
          };
        }
        n("8163"), e(n("66fd")), t(e(n("d35b")).default);
      }).call(this, n("543d").createPage);
    },
    d35b: function (t, e, n) {
      n.r(e);
      var o, r = n("d57b"),
        a = n("2e42");
      for (o in a) "default" !== o && function (t) {
        n.d(e, t, function () {
          return a[t];
        });
      }(o);
      n("b5a1");
      var i = n("f0c5"),
        r = Object(i.a)(a.default, r.b, r.c, !1, null, null, null, !1, r.a, void 0);
      e.default = r.exports;
    },
    d57b: function (t, e, n) {
      function o() {
        this.$createElement, this._self._c;
      }
      var r = {
          sunuiPopup: function () {
            return n.e("components/sunui-popup/sunui-popup").then(n.bind(null, "c2fe"));
          }
        },
        a = [];
      n.d(e, "b", function () {
        return o;
      }), n.d(e, "c", function () {
        return a;
      }), n.d(e, "a", function () {
        return r;
      });
    }
  },
  [
    ["be5b", "common/runtime", "common/vendor"]
  ]
]);